#include <SFML/Graphics.hpp>

#include <fstream>

#include "GlobalConsts.h"
#include "GameController.h"
#include "ImageCache.h"
#include "GridMap/GridMap.h"
#include "HUD/HUD.h"


int main()
{
    sf::RenderWindow window (sf::VideoMode (Window_Width, Window_Height), "MelkonRTS");
    window.setVerticalSyncEnabled (true);

	//TODO: Just run the menu, and call the game from it
	//TODO:
	//- UnitManager
	//- BuildingManager
	//- Map
	//- HUD
	//- EventManager (It handle commands also)
	//UnitManager;
	//BuildingManager;
	//EventHandler;

	std::ifstream ifstream ("Maps/TestMap.txt");
	GridMap::getInstance ().loadMap (ifstream, Image::BasicTile);
	HUD::getInstance ().generateSprite (Image::Nation1HUD);
	GameController game;
	game.run (window);

    return 0;
}